A swap control manages multiple overlapping groups of controls. Only one group is visible at a time. In this way, it is very similar to a Tab Control, except that the Swap Control does not provide tab buttons for the user to click. The swapping is done programmatically, and can be hooked up to any other control or event.
For example, a dialog box may contain a scrolling list of items on the left, and a swap control on the right. As the user selects items in the list, the swap control can respond by changing the active pane on the right. This can be used for a settings type of dialog box, or when there are too many choices to use a Tab control effectively. Another example would be a dialog box with a set of radio buttons to control which swap pane is visible.
To create a new swap control, call the function CreateSwapControl. Then, for each possible swap pane, create a group control, place other controls inside the groups, and call the function
CreateSwapPane. In the event handling routine for the dialog box, call the function
DisplaySwapPane in response to the appropriate user actions.